#pragma once

class Spinner
{
public:
	Spinner();
	virtual ~Spinner();
	bool  IsActive(){return m_active;}
	void  SetActive(bool active=true){m_active=active;}
	bool  IsFocus(){return m_focus;}
	void  SetFocus(bool focus=true){m_focus=focus;}
	bool  IsTrigger(){return m_trigger;}
	void  SetTrigger(bool trigger=true){m_trigger=trigger;}
	CRect GetBounding(){return m_bounding;}
	void  SetBounding(CRect bounding);
	bool  OnSetCursor();
	bool  OnMouseOver(CPoint point);
	void  Invalidate(HWND hwnd);

	void DrawSpin(CDC *pDC);

protected:
	CRect m_bounding;
	bool  m_active;

	CBitmap m_bitmap;
	SIZE    m_bmsize;

 	HCURSOR  m_cursor;
	bool	 m_focus;

	bool  m_trigger;
};
